def fibonacci(n):
    if n <= 1:
        return n
    # 递归情况
    else:
        return fibonacci(n - 1) + fibonacci(n - 2)


# 测试
print(fibonacci(6))  # 输出: 8


# 阶乘
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n - 1)


print(factorial(5))  # 输出: 120
